package sort;

/*
 * bron:  http://www.algolist.net/Algorithms/Sorting/Insertion_sort
 */
public class insertionSorter {
	
	public static int[] sort(int[] numbers){		
		int[] integers = numbers;
		int in, out;
			
		for(out=1; out < integers.length; out++){
		     int temp = integers[out];     
		     in = out; 
		     while(in > 0 && integers[in-1] >= temp){
		    	
		    	 integers[in] = integers[in-1]; 
		    	 --in;         
		     }
		     integers[in] = temp;       
		} 
		
		return integers;
	} 
	
	


}
